package com.data.JVM.gclog;

/**
 * Created by wangbing on 2018/6/2.
 */

/** 对象优先在Eden区分配
 * -verbose:gc -Xms20m -Xmx20m -Xmn10m -XX:+PrintGCDetails -XX:SurvivorRatio=8
 *
 * GC参数
 */
public class demo01 {
    private static final int _1M = 1024*1024;


    public static void testAllocation(){
        byte[] allocation1,allocation2,allocation3,allocation4;
        allocation1 = new byte[2*_1M];
        allocation2 = new byte[2*_1M];
        allocation3 = new byte[2*_1M];
        allocation4 = new byte[4*_1M];
    }

    public static void main(String[] args) {
        testAllocation();
    }
}
